﻿' Implements logic for automatically
' generating the GUID at creation time
Public MustInherit Class ModelWithGUID
    Inherits Model

    Public ReadOnly Property GUID
        Get
            Return ID
        End Get
    End Property

    Public Sub New()
        MyBase.New(System.Guid.NewGuid().ToString(), True)
    End Sub

    Public Sub New(ByVal newId As String)
        MyBase.New(newId)
    End Sub

    Public Sub New(ByVal newId As String, ByVal dontLoad As Boolean)
        MyBase.New(newId, dontLoad)
    End Sub
End Class
